<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="sql" uri="http://java.sun.com/jsp/jstl/sql"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>My JSP 'wage_list2.jsp' starting page</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<link rel="stylesheet" type="text/css" href="css/table.css">
<script language="javascript" type="text/javascript"
	src="My97DatePicker/WdatePicker.js"></script>

</head>
<body>
	<form action="admin/wage_history.jsp" method="post" name="search">
		<table>
			<caption>按条件查询</caption>
			<tr>
				<td>月份</td>
				<td><input name="wage_month"
					onclick="WdatePicker({dateFmt:'yyyy-MM'})" type="text" /></td>
				<td><input type="submit" value="提交"></td>
		</table>
	</form>
	<sql:query var="result"
		sql="select wage_emp_num,wage_emp_name,wage_emp_dept,wage_month,wage_subsidy_sum,wage_penalty,wage_reward,wage_base,wage_tax,wage_sxyj,wage_should,wage_real from t_wage_backup where wage_month='${param.wage_month}'" />
	<table>
		<caption>工资列表${param.wage_month}</caption>
		<thead>
			<tr>
				<th>员工编号</th>
				<th>员工姓名</th>
				<th>部门</th>
				<th>月份</th>
				<th>津贴工资</th>
				<th>处罚</th>
				<th>奖金</th>
				<th>基本工资</th>
				<th>税费</th>
				<th>三险一金</th>
				<th>应发工资</th>
				<th>实际工资</th>
			</tr>
		</thead>
		<tbody id="tab">
			<c:forEach var="row" items="${result.rowsByIndex}">
				<tr>
					<c:forEach var="column" items="${row}">
						<td><c:out value="${column}" />
						</td>
					</c:forEach>

				</tr>
			</c:forEach>
		</tbody>
	</table>
	<script type="text/javascript">
	<!--
		var Ptr = document.getElementById("tab").getElementsByTagName("tr");
		function $() {
			for (i = 1; i < Ptr.length + 1; i++) {
				Ptr[i - 1].style.backgroundColor = (i % 2 > 0) ? "#fff"
						: "#eee";
			}
		}
		window.onload = $;
		for ( var i = 0; i < Ptr.length; i++) {
			Ptr[i].onmouseover = function() {
				this.tmpClass = this.className;
				this.style.backgroundColor = "#ccc";

			};
			Ptr[i].onmouseout = function() {
				for (i = 1; i < Ptr.length + 1; i++) {
					Ptr[i - 1].style.backgroundColor = (i % 2 > 0) ? "#eee"
							: "#fff";
				}
			}
		}
	//-->
	</script>

</body>
</html>